<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>最新消息</title>
    <meta name="description" content="Kenny is a Dashboard & Admin Site Responsive Template by hencework." />
    <meta name="keywords" content="admin, admin dashboard, admin template, cms, crm, Kenny Admin, kennyadmin, premium admin templates, responsive admin, sass, panel, software, ui, visualization, web app, application,sortable, reorder, list, javascript, html5, drag and drop, dnd, animation, groups, angular, ng-sortable, effects, rubaxa" />
    <meta name="author" content="hencework" />
    <!-- Favicon -->
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="icon" href="favicon.ico" type="image/x-icon">
    <link href="__STATIC__/admin/dist/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <style>
        .mains {
            background-color: #eee; 
            height: 100%;
            padding-bottom: 20px;
        } 

        .cen_top {
            background-color: #fff;
            height: 135px;
            border-radius: 6px;
            padding-top: 20px;
        }

        .inline {
            display: inline-block;
            height: 33px;
            width: 0;
            vertical-align: middle;
            border: 2px solid #566FC9;
            margin-right: 10px;
            margin-top: -12px;
        }

        .lines {
            height: 2px;
            background-color: #ddd;
            margin-left: 4%;
            margin-top: 10px;
        }
        .cen_but{
            background-color: #fff;
            border-radius: 6px;
            padding-top: 20px;
            padding-bottom: 20px;
        }
        .lists{
            border-bottom: 2px solid #ddd;
            padding-bottom: 10px;
        }
        .pagination>.active>span{
            background: #566FC9; 
            border-color: #566FC9; 
        }
    </style>
</head>
 
<body>
    <div class="container-fluid mains">
        <div class="row" style="margin-top:40px;">
            <div class="col-md-3"></div>
            <div class="col-md-6 cen_top">
                <i class="inline"></i>
                <h2 style="display: inline-block;">最新消息</h2>
                <div class="row">

                    <div class="col-md-11 lines">

                    </div>

                </div>
            </div>
            <div class="col-md-3"></div>
        </div> 

        <div class="row" style="margin-top:20px;">
                <div class="col-md-3"></div>
                <div class="col-md-6 cen_but">
                     <!-- 详情 -->
                     {foreach name="annonceList" item="v" key="key" }
                     <div class="row" style="color: {$v['color']}">
                       <div class="col-md-1"></div>
                      
                       <div class="col-md-10 lists">
                           <div class="row">
                          <div class="col-md-9">
                                <h4>{$v['title']}{if condition="(empty($v['is_sign']))"}<span style="color: red;">(待确认)</span>{/if}</h4>
                          </div>
                          <div class="col-md-3" style="font-size:14px;">
                                <span class="glyphicon glyphicon-time" aria-hidden="true" style="margin-top:10px;"></span>
                                <span>{$v['add_time']}</span>
                          </div>
                        </div>
                        <div class="row" style="margin-top:10px;">
                          <div class="col-md-9">
                            <h5>发布人：{$v['name']}</h5>
                          </div>
                          <div class="col-md-3">
                            <a class="btn-color" href="/admin/Index/readthis?id={$v['id']}" target="_self" role="button" style="
                            padding: 10px 18px;
                            vertical-align: top;
                            background: #566FC9;
                            color: #fff;
                            text-decoration: none;">查看詳情</a>
                        </div>
                    </div>
                       </div>
                       
                       <div class="col-md-1"></div>
                   </div>
                {/foreach}
                  
                <div class="page" style=" text-align: right;padding-right: 62px;">{$page}</div>
                </div>
                <div class="col-md-3"></div>
            </div>
    </div>

    <!-- jQuery -->
    <script src="__STATIC__/admin/dist/js/jquery.min.js"></script>
    <!-- Bootstrap Core JavaScript -->
    <script src="__STATIC__/admin/dist/js/bootstrap.min.js"></script>
    <script src="__STATIC__/admin/dist/js/jquery-ui.min.js"></script>
    <script>
    // 定时获取公告数据
    //  function ajax_send(func){
    //     var query = new Object();
    //     query.id = "123";
    //     $.ajax({
    //         type:"POST",
    //         data:query,
    //         url:"/admin/Index/annonceList",
    //         datatype:"json",
    //         success:function(res){
    //             getAnnonce(res);
    //         }
    //     });
    // }
    // function getAnnonce(data){
    //     if(data.arr.length>0) {
    //         var str='';
    //         for (var i = 0; i < data.arr.length; i++) {
    //             var sta='';
    //             if(data.arr[i].is_sign=='0'){
    //                 sta='<span style="color: red;">(待确认)</span>';
    //             }
    //             str+='<div class="row" style="color: '+data.arr[i].color+'">'
    //                    +'<div class="col-md-1"></div>'
    //                    +'<div class="col-md-10 lists">'
    //                        +'<div class="row">'
    //                       +'<div class="col-md-9">'
    //                             +'<h4>'+data.arr[i].title+sta+'</h4>'
    //                       +'</div>'
    //                       +'<div class="col-md-3" style="font-size:14px;">'
    //                             +'<span class="glyphicon glyphicon-time" aria-hidden="true" style="margin-top:10px;"></span>'
    //                             +'<span>'+data.arr[i].add_time+'</span>'
    //                       +'</div>'
    //                     +'</div>'
    //                     +'<div class="row" style="margin-top:10px;">'
    //                       +'<div class="col-md-9">'
    //                         +'<h5>发布人：'+data.arr[i].name+'</h5>'
    //                       +'</div>'
    //                       +'<div class="col-md-3">'
    //                         +'<a class="btn-color" href="/admin/Index/readthis?id='+data.arr[i].id+'" target="_self" role="button" style="padding: 10px 18px;vertical-align: top;background: #566FC9;color: #fff;text-decoration: none;">查看詳情</a>'
    //                     +'</div>'
    //                 +'</div>'
    //                    +'</div>'
                       
    //                    +'<div class="col-md-1"></div>'
    //                +'</div>';
    //         }
    //         str+='<div class="page" style=" text-align: right;padding-right: 62px;">'+data.page+'</div>';
    //         $('.cen_but').html(str);
    //     }
        
    // }
    // (function(){

    //     var interval = setInterval(function(){
    //                 ajax_send(function(res){
    //                     clearInterval(interval);
    //             });
    //         },30000); //每个30秒调用一次函数

    // })();    
</script>
</body>

</html>